Skip to content

Comments

Fix off-by-one in InsertAndShift resize condition (#2291)#2292

Merged
JanKallman merged 1 commit intodevelop8from
bug/i2291
Feb 22, 2026
Merged

Fix off-by-one in InsertAndShift resize condition (#2291)#2292
JanKallman merged 1 commit intodevelop8from
bug/i2291

Conversation

@swmal
Copy link
Contributor

@swmal swmal commented Feb 18, 2026

Fixed a bug in ChangeableDictionary.InsertAndShift where the array resize condition was checking pos + 1 >= Length - 1 instead of _count >= Length - 1. This caused an ArgumentException when calling InsertColumn on xlsx files where the number of defined columns was at the array boundary.

This PR also includes a unit test that replicated the issue and verifies the fix.

@swmal swmal self-assigned this Feb 18, 2026
@swmal swmal added the bug Something isn't working label Feb 18, 2026
@JanKallman JanKallman merged commit 426c613 into develop8 Feb 22, 2026
1 check passed
@JanKallman JanKallman deleted the bug/i2291 branch February 22, 2026 08:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants